package controller

import (
	"github.com/gin-gonic/gin"
	"niu-video/app/model"
	"niu-video/app/service"
	"niu-video/pkg/response"
	"niu-video/pkg/validate"
)

type CollectController struct {
}

// Collect 收藏视频
func (ctrl *CollectController) Collect(c *gin.Context) {

	request := model.CollectAction{}
	if ok := validate.Validate(c, &request); !ok {
		return
	}
	userId := c.GetInt64("current_user_id")
	msg := service.CollectService.Collect(request, userId)
	response.OkWithMessage(msg, c)
}
